/**
* \brief 
* \author pengcheng (pengcheng@yslrpch@126.com)
* \date 
* \attention CopyrightÃ‚Â©ADC Technology(tianjin)Co.Ltd
* \attention Refer to COPYRIGHT.txt for complete terms of copyright notice
*/


#ifndef SGM_SGM_HPP
#define SGM_SGM_HPP

#include <memory>
#include <cstdint>
#include <stereo_vision/sgm.h>
#include "stereo_vision/impl/types.hpp"

namespace adc {

template <typename T, size_t MAX_DISPARITY>
class SemiGlobalMatching {

public:
	using input_type = T;
	using output_type = adc::output_type;

private:
	class Impl;
	std::unique_ptr<Impl> m_impl;

public:
	SemiGlobalMatching();
	~SemiGlobalMatching();

	void execute(
		output_type *dest_left,
		output_type *dest_right,
		const input_type *src_left,
		const input_type *src_right,
		int width,
		int height,
		int src_pitch,
		int dst_pitch,
		const StereoSGM::Parameters& param);

	void enqueue(
		output_type *dest_left,
		output_type *dest_right,
		const input_type *src_left,
		const input_type *src_right,
		int width,
		int height,
		int src_pitch,
		int dst_pitch,
		const StereoSGM::Parameters& param,
		cudaStream_t stream);

};

}

#endif
